var dengLu = document.querySelector(".dengLu");
var account = document.querySelector(".account");
var password = document.querySelector(".password");
var tip_one = document.querySelector(".tip_one");
var tip_two = document.querySelector(".tip_two");
var first = document.querySelector(".first");
var second = document.querySelector(".second");
var login_div = document.querySelector(".login_div");
var zhuCe_font = document.querySelector(".zhuCe_font");
var zhuCe = document.querySelector(".zhuCe");
var zhuCe_back = document.querySelector(".zhuCe_back");
//点击输入框会有相应样式的变化，用到了失去焦点的事件
account.onclick = function () {
  first.style.borderColor = "red";
    account.onblur = function () {
      first.style.borderColor = "black";
  };
};
password.onclick = function () {
  second.style.borderColor = "red";
  password.onblur = function () {
    second.style.borderColor = "black";
  };
};
//两个页面的相互返回
zhuCe_font.onclick = function () {
  login_div.style.display = "none";
  zhuCe.style.display = "block";
};
zhuCe_back.onclick = function () {
  login_div.style.display = "block";
  zhuCe.style.display = "none";
};
//登录页面的功能
dengLu.onclick = function () {
  if (password.value == "" || account.value == "") {
    tip_one.style.display = "block";
    account.onclick = function () {
      tip_one.style.display = "none";
    };
    password.onclick = function () {
      tip_one.style.display = "none";
    };
  }
};

//注册页面
var zhuCe_center_account = document.querySelector(".zhuCe_center_account");
var zhuCe_center_password = document.querySelector(".zhuCe_center_password");
var zhuCe_center_password_two = document.querySelector(
  ".zhuCe_center_password_two"
);
var zhuCe_center_account_div = document.querySelector(
  ".zhuCe_center_account_div"
);
var zhuCe_center_password_div = document.querySelector(
  ".zhuCe_center_password_div"
);
var zhuCe_center_password_div_two = document.querySelector(
  ".zhuCe_center_password_div_two"
);
//点击输入框会有相应样式的变化，用到了失去焦点的事件
zhuCe_center_account.onclick = function () {
  zhuCe_center_account_div.style.borderColor = "red";
  zhuCe_center_account.onblur = function () {
    zhuCe_center_account_div.style.borderColor = "black";
  };
};
zhuCe_center_password.onclick = function () {
  zhuCe_center_password_div.style.borderColor = "red";
  zhuCe_center_password.onblur = function () {
    zhuCe_center_password_div.style.borderColor = "black";
  };
};
zhuCe_center_password_two.onclick = function () {
  zhuCe_center_password_div_two.style.borderColor = "red";
  zhuCe_center_password_two.onblur = function () {
    zhuCe_center_password_div_two.style.borderColor = "black";
  };
};
